package com.enjoyor.soa.traffic.util.enums.signal;

public enum ErrorType {
	
//	1	灯输出故障
	LAMP_ERROR("1","灯输出故障"),
//	2	电源故障
	POWER_ERROR("2","电源故障"),
//	3	时钟故障
	CLOCK_ERROR("3","时钟故障"),
//	4	运行故障
	RUN_ERROR("4","运行故障"),
//	5	方案错误
	PLAN_ERROR("5","方案错误"),
//	9	其他错误
	OTHER_ERROR("9","其他错误");

	private final String key;

	private final String value;

	private ErrorType(String key, String value) {
		this.key = key;
		this.value = value;
	}

	public String getKey() {
		return this.key;
	}

	public String getValue() {
		return this.value;
	}
	public static String getValue(String key) {  
		ErrorType[] enums = values();  
        for (ErrorType e : enums) {  
            if (e.getKey().equals(key)) {  
                return e.getValue();  
            }  
        }  
        return null;  
    } 
}
